/*
 *
 * Copyright (C) 2023 Zealcomm Inc. (https://www.zealcomm.com)
 *
 */
#ifndef IRTC_BASE_OBJC_IRTCShareScreenStream_H_
#define IRTC_BASE_OBJC_IRTCShareScreenStream_H_

#import <IRTC/IRTCLocalStream.h>
#import <IRTC/IRTCMacros.h>

NS_ASSUME_NONNULL_BEGIN
@class IRTCShareScreenConstraints;
/// This class represent a screen share
/// stream.<br>这个类代表了一条屏幕共享媒体流。
IRTC_OBJC_EXPORT
@interface IRTCShareScreenStream : IRTCLocalStream
/**
  Create an IRTCLocalStream from screen
  capturer.<br>根据指定配置参数从麦克风和摄像头创建一条IRTCLocalStream。
  @param constraints Constraints for creating the stream. The stream will not be
  impacted if changing constraints after it is
  created.<br>创建媒体流的配置参数。如果在创建完媒体流后改变这个参数，媒体流不会变。
  @param onSuccess Success callback .<br>成功回调。
  @param on_failure Failure callback with an error.<br>失败回调会返回失败原因。
  @return Return an IRTCLocalStream object.<br>返回一个IRTCLocalStream对象。
*/
- (instancetype)initWithConstratins:(IRTCShareScreenConstraints*)constraints
                          onSuccess:(nullable void (^)())onSuccess
                          onFailure:(nullable void (^)(NSError*))onFailure;

/**
  @brief Stop the stream.<br>将媒体流的第一条视频轨绑定到视频渲染器上。
 */
- (void)stop;

@end
NS_ASSUME_NONNULL_END
#endif  // IRTC_BASE_OBJC_IRTCShareScreenStream_H_